<script setup lang="ts">
import 'virtual:windi.css'
import useInterceptExit from './useInterceptExit'
import useIgnoreMouseEvents from './useIgnoreMouseEvents'
import useSetting from '@/src/stores/useSetting'
import vConsole from 'vconsole'

if (process.env.NODE_ENV === 'development') {
  new vConsole()
}
useInterceptExit()
useIgnoreMouseEvents({
  classList: ['electron-ignore-mouse-events', 'el-overlay-dialog'],
  attrList: [{ key: '_electron', val: 'ignore-mouse-events' }]
})
const settingStore = useSetting()
settingStore.init()
</script>

<template>
  <div _electron="ignore-mouse-events" _pos="fixed top-0 left-0">
    <div _pos="relative" _flex="~ col" _h="screen" _w="screen">
      <router-view
        _flex="~ col 1"
        _pos="absolute top-0 left-0"
        _w="full"
        _h="full"
        _overflow="auto"
      />
    </div>
  </div>
</template>

